{% from "components/macros/layout.html" import card, chip, stat_row %} {% from "components/macros/form.html" import action %} {% from "components/macros/table.html" import data_table, pager as pager_links %} {% macro task_detail(row) %}
{% if row.description %}

{{ row.description }}

{% endif %} {% if row.error %}

Error details

{{ row.error }}
{% endif %} {{ stat_row([("Job ID", row.job_id), ("Started", row.started), ("Finished", row.finished)]) }}
{% endmacro %} {% call card("Task history", "Newest first") %}
{{ action("Refresh", hx_replace(here, "#overseer-main")) }}
{{ data_table([ {"key": "name", "label": "Task"}, {"key": "queue", "label": "Queue"}, {"key": "duration", "label": "Duration", "align": "right"}, {"key": "enqueued", "label": "Enqueued"}, {"key": "state", "label": "Status", "kind": "status"}, ], tasks, empty="No task history yet", detail=task_detail) }} {{ pager_links(pager, "#overseer-main") }} {% endcall %}